package com.ltmonitor.web.util;


public class ModelAndView extends org.springframework.web.servlet.ModelAndView {

	public void setState(String state) {
		super.addObject("state", state);
	}

	public void put(String key, Object value) {
		addObject(key, value);
	}

	public ModelAndView() {

	}

	public ModelAndView(String viewName) {
	}

	public void noticeSuccess() {
		setState("success");
	}

	public void noticeFailure(String message) {
		this.setState("error");
		this.setMessage(message);
		/**
		if (StringUtil.isNotEmpty(message)) {
			logger.warn("invoke method failure:" + message);

		}*/
	}

	public void setState(String state, String message) {
		super.addObject("state", state);
		super.addObject("message", message);
	}

	public void setMessage(String message) {
		super.addObject("message", message);

	}
}
